package com.iking.toolkit.model;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;


/**
 * @Author: zhaolei
 * @Description: 分页查询类(其他业务查询集成该查询类)
 * @Date: create at  2019/8/5 0005 16:11
 */
@Schema(name = "PageConditions", description = "分页查询类")
public class PageConditions{

    /**
     * 分页大小
     */
    @NotNull(message = "分页大小不能为空!")
    @Min(value = 1, message = "分页大小不能小于1！")
    @Schema(description = "分页大小")
    private Integer pageSize;
    /**
     * 当前页
     */
    @Min(value = 1, message = "当前页不能小于1!")
    @NotNull(message = "当前页不能为空!")
    @Schema(description = "当前页")
    private Integer currentPage;

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    @Override
    public String toString() {
        return "PageConditions{" +
                "pageSize=" + pageSize +
                ", currentPage=" + currentPage +
                '}';
    }
}
